<template>
  <div>
    <y-header></y-header>
    <div class="person_body clearfix">
      <y-side :type="'dyn'"></y-side>
      <div class="person_content">
        <ul class="person_title clearfix">
          <li>{{this.$route.query.title}}</li>
        </ul>
        <div class="person_info ">

         <div class="clearfix" v-html="articleContent" style="padding: 20px 25px;"></div>

        </div>
      </div>
    </div>
    <y-footer></y-footer> 
  </div>
</template>
<script>
import YHeader from '~/components/common/Header'
import YFooter from '~/components/common/Footer'
import {listByType, getById} from '~/api/article.js'
export default {
  data () {
    return {
      load: false,
      tab: 1,
      num: 1,
      articleTitle: '',
      articleContent: ''
    }
  },
 

  methods: {
      openDetail() {
        getById({id:this.$route.query.id}).then(res => {
                res = res.data;
                console.log(res.data);              
                this.articleContent = res.data.content;
                this.articleTitle = res.data.title
            
        })
      } 
  },
  created () {
      this.openDetail();
  },
  components: {
    YHeader,
    YFooter
  }
}
</script>
<style lang="scss" rel="stylesheet/scss">
@import '~/assets/css/account.scss';
  .person_body {
    width: 1200px;
    margin: 30px auto 0;
    min-height: 1000px;
    .upload_com {
      .solid_btn {
        display: inline-block;
        height: 25px;
        line-height: 22px;
        background: #fff;
        border-color: #ddd;
        color: #999;
        outline: none;
        &:hover {
          color: #D51423;
          border-color: #D51423;
        }
      }
    }
  }
  .person_content {
    width: 1012px;
    float: right;
    background: #fff;
    border-radius: 6px;
  }
  .person_title {
    border-bottom: 1px solid rgb(242, 242, 242);
    li {
      color: #D51423;
      float: left;
      line-height: 60px;
      padding: 0 30px;
      border-bottom: 2px solid #D51423;
      font-size: 14px;
    }
  }
  .person_info {
    padding-bottom: 40px;
  }
  .person_info h1 {
    margin-bottom: 10px;
  }
 
  .name{
    .form_input{
      margin: 10px 0;
      height: 34px;
      border: 1px solid #e7e7e7;
      width: 278px;
      text-indent: 1em;
    }
  }
  .cont_btn {
    width: 280px;
    display: block;
    margin:20px auto 0;
  }
  .table td.name {
    text-align: center;
  }
  .table th {
    line-height: 36px;
    color: #333;
    background-color: #ffffff;
}
</style>
